<template>
  <div>
    <div>
      <h3>List</h3>
      <button @click="redirect">返回去Count</button>
    </div>
    <router-link to="/list/music/1">去武汉-草莓音乐节</router-link>/
    <router-link
      :to="{
        name: 'music',
        params: {
          id: '2',
        },
      }"
      >去南京-诗和远方</router-link
    >/
    <router-link to="/list/music/3">去上海-周杰伦演唱会</router-link>
    <hr />
    <router-link to="/list/news?n=18&m=19">看台湾新闻</router-link>/
    <router-link
      :to="{
        name: 'news',
        query: {
          n: 2,
          m: 7,
        },
      }"
      >看大陆新闻</router-link
    >

    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "List",
  methods: {
    redirect() {
      this.$router.replace({
        name: "count",
      });
    },
  },
};
</script>

<style>
</style>